<div class="container">
  <div class="searchModule">
    <input type="text" [(ngModel)]="keyword" (keyup)="searchInput($event)">
  </div>
  <h2>待办事项</h2>
  <ul *ngIf="todoList.length != 0">
    <li *ngFor="let item of todoList;let key = index;" [hidden]="item.finished">
      <input type="checkbox" [(ngModel)]="item.finished" (change)="inputChange($event)">
      <span>{{item.title}}</span>
      <span>------</span>
      <button (click)="deleteItem(key)">X</button>
    </li>
  </ul>
  <h2>已完成事项</h2>
  <ul>
    <li *ngFor="let item of todoList;let key = index;" [hidden]="!item.finished">
      <input type="checkbox" [(ngModel)]="item.finished" (change)="inputChange($event)">
      <span>{{item.title}}</span>
      <span>------</span>
      <button (click)="deleteItem(key)">X</button>
    </li>
  </ul>
  <hr>
  <pre>{{todoList | json}}</pre>
</div>